#ifndef SPHERE_H
#define SPHERE_H

#include "Framework/Prerequisites.h"

namespace tyro
{
	namespace Geometry
	{
		class Sphere
		{
		public:

			Sphere() : radius(1.0f), centre(Math::Vector3f::ZERO) {}

			//	Get the radius of the sphere
			FLOAT_32 GetRadius(void) const { return radius; }

			// Set the radius of the sphere
			void SetRadius(FLOAT_32 newRadius) { radius = newRadius; }

			// Get the centre point of the sphere
			Math::Vector3f& GetCentre(void) const { return centre; }

			// Set the centre point of the sphere
			void SetCentre(Math::Vector3f& vec) { centre = vec; }

			// Calculate if one sphere intersects another
			bool Intersects(const Sphere* other)
			{
				return (centre - other->centre).MagnitudeSquared() <= Math::Sqr<FLOAT_32>(other->radius + radius);
			}



		protected:
		private:

			FLOAT_32		radius;
			Math::Vector3f	centre;
		};
	}
}
#endif